package com.ishopping.common.core.base.exception;

/**
 * 
 * Description:
 * <BR>
 * 
 * @author Jim
 * CreateTime: Mar 21, 2016
 */
public class ServiceException extends RuntimeException {

	private static final long serialVersionUID = 4514891174875747350L;

	private String code;

	private String msg;

	public ServiceException(String code) {
		super(code);
		this.code = code;
	}

	public ServiceException(String code, String msg) {
		super(code + ":" + msg);
		this.code = code;
		this.msg = msg;
	}

	public ServiceException(String code, Throwable e) {
		super(code, e);
		this.code = code;
	}

	public ServiceException(String code, String msg, Throwable e) {
		super(code + ":" + msg, e);
		this.code = code;
		this.msg = msg;
	}

	public String getCode() {
		return code;
	}

	public String getMsg() {
		return msg;
	}
}